home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Answers 2002 January
/
PC Answers January 2002.7z
/
PC Answers January 2002.bin
/
graphics
/
freepixl
/
_SETUP.1
/
Vr299set.pxl
< prev
next >
Wrap
Text File
|
2000-12-23
|
13KB
|
538 lines
{ Filename : vr299set.pxl
Purpose : Video color and aspect ratio setup for PCs
Version : 1.2 RELEASE
Date : 16-feb-1995
Author : S.Dibbs, VYSOR Integration Inc
Version : 4.0 RELEASE
Date : 30-may-1996
Author : S.Dibbs, VYSOR Integration Inc
Version : 4.4 RELEASE
Date : 30-aug-1998
Author : S.Dibbs, VYSOR Integration Inc
------------------------------------------------------------------------}
Initialize:
WinGetActive(Current$)
GetScreenCaps(BITSPIXEL,BitsPerPixel)
GetScreenCaps(HORZRES,X_Pixels)
GetScreenCaps(VERTRES,Y_Pixels)
If BitsPerPixel = 8 Then Title$ = "Monitor Setup: 8-bit Colour Scale v5.0"
If BitsPerPixel = 15 Then Title$ = "Monitor Setup: 15-bit Colour Scale v5.0"
If BitsPerPixel = 16 Then Title$ = "Monitor Setup: 16-bit Colour Scale v5.0"
If BitsPerPixel = 24 Then Title$ = "Monitor Setup: 24-bit Colour Scale v5.0"
If BitsPerPixel = 32 Then Title$ = "Monitor Setup: 32-bit Colour Scale v5.0"
WinTitle(Current$,Title$)
WinLocate(Title$,0,0,X_Pixels,Y_Pixels,Res)
UseBackground(TRANSPARENT,0,0,0)
DrawBackGround
UseCoordinates(PIXEL)
DirGet(SourceDir$)
Draw_All_Grids = 0
Square$ = SourceDir$ + "\square.bmp"
InfoMenu(REMOVE)
WaitInput(100)
SetMenu("E&xit",Run_Leave,
ENDPOPUP,
"&Colour Wedge",Wedge,
ENDPOPUP,
"&Geometric Pattern",Geom,
ENDPOPUP,
"&Draw Grids",IGNORE,
"Grid &1",Grid,
"Grid &2",Grid2,
"Grid &3", Grid3,
"Draw &All",All_Grids,
ENDPOPUP,
"&Help",IGNORE,
"Colour Wedge",Help_Wedge,
"Geometric Pattern",Help_Pattern,
"Grids",Help_Grids,
SEPARATOR,
"&About",About,
ENDPOPUP)
Wait_for_Input:
WaitInput()
Invert:
InvertRectangle(cx1,cy1,cx2,cy2)
Goto Wait_for_Input
Wedge:
DrawBackground
SetMouse()
WinGetClientRect("",cx1,cy1,cx2,cy2)
SetRightMouse(cx1,cy1,cx2,cy2,Invert,X,Y)
Red = 0
Green = 0
Blue = 0
X1 = 1 X2 = 32
Y1 = 11 Y2 = 94
UsePen(SOLID,2,255,255,255)
UseBrush(NULL,0,0,0)
DrawRectangle(0,10,1023,96) {Gray}
DrawRectangle(0,110,1023,196) {Red}
DrawRectangle(0,210,1023,296) {Green}
DrawRectangle(0,320,1023,396) {Blue}
DrawRectangle(0,410,1023,496) {Yellow}
DrawRectangle(0,510,1023,596) {Magenta}
DrawRectangle(0,610,1023,696) {Cyan}
GrayLoop:
If X1 = 1025 Then Goto EndGrayLoop
UsePen(NULL,1,Red,Green,Blue)
UseBrush(SOLID,Red,Green,Blue)
DrawRectangle(X1,Y1,X2,Y2)
X1 = X1 + 32
X2 = X2 + 32
If Red < 7 Then Red = Red + 7
If Green < 7 Then Green = Green + 7
If Blue < 7 Then Blue = Blue + 7
If Red >= 7 Then Red = Red + 8
If Green >= 7 Then Green = Green + 8
If Blue >= 7 Then Blue = Blue + 8
Goto GrayLoop
EndGrayLoop:
Red = 0
Green = 0
Blue = 0
X1 = 1 X2 = 32
Y1 = 111 Y2 = 194
RedLoop:
If X1 = 1025 Then Goto EndRedLoop
UsePen(NULL,1,Red,Green,Blue)
UseBrush(SOLID,Red,Green,Blue)
DrawRectangle(X1,Y1,X2,Y2)
X1 = X1 + 32 X2 = X2 + 32
If Red < 7 Then Red = Red + 7
If Red >= 7 Then Red = Red + 8
Goto RedLoop
EndRedLoop:
Red = 0
Green = 0
Blue = 0
X1 = 1 X2 = 32
Y1 = 211 Y2 = 294
GreenLoop:
If X1 = 1025 Then Goto EndGreenLoop
UsePen(NULL,1,Red,Green,Blue)
UseBrush(SOLID,Red,Green,Blue)
DrawRectangle(X1,Y1,X2,Y2)
X1 = X1 + 32 X2 = X2 + 32
If Green < 7 Then Green = Green + 7
If Green >= 7 Then Green = Green + 8
Goto GreenLoop
EndGreenLoop:
Red = 0
Green = 0
Blue = 0
X1 = 1 X2 = 32
Y1 = 321 Y2 = 394
BlueLoop:
If X1 = 1025 Then Goto EndBlueLoop
UsePen(NULL,1,Red,Green,Blue)
UseBrush(SOLID,Red,Green,Blue)
DrawRectangle(X1,Y1,X2,Y2)
X1 = X1 + 32 X2 = X2 + 32
If Blue < 7 Then Blue = Blue + 7
If Blue >= 7 Then Blue = Blue + 8
Goto BlueLoop
EndBlueLoop:
Red = 0
Green = 0
Blue = 0
X1 = 1 X2 = 32
Y1 = 411 Y2 = 494
YellowLoop:
If X1 = 1025 Then Goto EndYellowLoop
UsePen(NULL,1,Red,Green,Blue)
UseBrush(SOLID,Red,Green,Blue)
DrawRectangle(X1,Y1,X2,Y2)
X1 = X1 + 32 X2 = X2 + 32
If Red < 7 Then Red = Red + 7
If Green < 7 Then Green = Green + 7
If Red >= 7 Then Red = Red + 8
If Green >= 7 Then Green = Green + 8
Goto YellowLoop
EndYellowLoop:
Red = 0
Green = 0
Blue = 0
X1 = 1 X2 = 32
Y1 = 511 Y2 = 594
MagentaLoop:
If X1 = 1025 Then Goto EndMagentaLoop
UsePen(NULL,1,Red,Green,Blue)
UseBrush(SOLID,Red,Green,Blue)
DrawRectangle(X1,Y1,X2,Y2)
X1 = X1 + 32 X2 = X2 + 32
If Red < 7 Then Red = Red + 7
If Blue < 7 Then Blue = Blue + 7
If Red >= 7 Then Red = Red + 8
If Blue >= 7 Then Blue = Blue + 8
Goto MagentaLoop
EndMagentaLoop:
Red = 0
Green = 0
Blue = 0
X1 = 1 X2 = 32
Y1 = 611 Y2 = 694
CyanLoop:
If X1 = 1025 Then Goto EndCyanLoop
UsePen(NULL,1,Red,Green,Blue)
UseBrush(SOLID,Red,Green,Blue)
DrawRectangle(X1,Y1,X2,Y2)
X1 = X1 + 32 X2 = X2 + 32
If Green < 7 Then Green = Green + 7
If Blue < 7 Then Blue = Blue + 7
If Green >= 7 Then Green = Green + 8
If Blue >= 7 Then Blue = Blue + 8
Goto CyanLoop
EndCyanLoop:
Goto Wait_for_Input
GetXY:
Str(X,X$) Str(Y,Y$)
Co_ords$ = "X = " + X$
Co_ords$ = Co_ords$ + " Y = "
Co_ords$ = Co_ords$ + Y$
MessageBox(OK,1,INFORMATION,Co_ords$,"Mouse Co-ordinates",Res)
Goto Wait_for_input
All_Grids:
Draw_All_Grids = 1
Grid:
DrawBackGround
SetMouse()
Size$ = "33"
If Draw_All_Grids = 1 Then Goto Grid_a
TextBox("Range is 1 - 64","Enter Grid Spacing",Size$,Btn)
If Btn = 2 Then Goto Wait_for_Input
Grid_a:
Val(Size$,GridSize,Res)
If Res = 0 Then Goto Grid
If GridSize > 64 Then Goto Grid
UsePen(SOLID,1,255,255,255)
X1 = 0 X2 = X_Pixels
Y1 = 0 Y2 = Y_Pixels
GridLoopX:
DrawLine(X1,Y1,X2,Y1)
Y1 = Y1 + GridSize
If Y1 < Y_Pixels Then Goto GridLoopX
Y1 = 0 Y2 = Y_Pixels
GridLoopY:
DrawLine(X1,Y1,X1,Y2)
X1 = X1 + GridSize
If X1 < X_Pixels Then Goto GridLoopY
If Draw_All_Grids = 1 Then Goto Grid2
Goto Wait_for_Input
Grid2:
WinGetClientRect("",cx1,cy1,cx2,cy2)
SetRightMouse(cx1,cy1,cx2,cy2,Invert,X,Y)
SetMouse()
X1 = 0 X2 = X_Pixels
Y1 = 0 Y2 = Y_Pixels
UseBrush(NULL,0,0,0)
UsePen(SOLID,1,255,255,255)
DrawRectangle(X1,Y1,X2,Y2)
FileExist("square.bmp",Res)
If Res = 0 then Gosub SData
If Res = 1 then Gosub Bitmaps
UseBrush(SOLID,0,0,0)
DrawRectangle(203,178,813,529)
DrawLine(204,295,812,295)
DrawLine(204,412,812,412)
InitRed:
Red = 0
Green = 0
Blue = 0
X1 = 204 X2 = 212
Y1 = 180 Y2 = 294
RedScale:
If X1 >= 810 then Goto EndRed
UsePen(NULL,1, Red, Green, Blue)
UseBrush(SOLID,Red,Green,Blue)
DrawRectangle(X1,Y1,X2,Y2)
X1 = X1 + 7 X2 = X2 + 7
Red = Red + 3
If Red > 255 Then Red = 255
Goto RedScale
EndRed:
InitGreen:
Red = 0
Green = 0
Blue = 0
X1 = 204 X2 = 212
Y1 = 296 Y2 = 411
GreenScale:
If X1 >= 810 then Goto EndGreen
UsePen(NULL,1, Red, Green, Blue)
UseBrush(SOLID,Red,Green,Blue)
DrawRectangle(X1,Y1,X2,Y2)
X1 = X1 + 7 X2 = X2 + 7
Green = Green + 3
If Green > 255 Then Green = 255
Goto GreenScale
EndGreen:
InitBlue:
Red = 0
Green = 0
Blue = 0
X1 = 204 X2 = 212
Y1 = 413 Y2 = 528
BlueScale:
If X1 >= 810 then Goto EndBlue
UsePen(NULL,1, Red, Green, Blue)
UseBrush(SOLID,Red,Green,Blue)
DrawRectangle(X1,Y1,X2,Y2)
X1 = X1 + 7 X2 = X2 + 7
Blue = Blue + 3
If Blue > 255 Then Blue = 255
Goto BlueScale
EndBlue:
If Draw_All_Grids = 1 Then Goto Grid3
UseBrush(NULL,0,0,0)
UsePen(SOLID,1,255,255,255)
DrawRectangle(203,178,813,529)
Goto Wait_For_Input
Grid3:
SetMouse()
UseBrush(NULL,0,0,0)
UsePen(SOLID,1,255,255,255)
DrawRectangle(203,178,813,529)
DrawLine(204,295,812,295)
DrawLine(204,412,812,412)
InitCyan:
Red = 0
Green = 0
Blue = 0
X1 = 803 X2 = 812
Y1 = 237 Y2 = 294
CyanScale:
If X1 <= 202 then Goto EndCyan
UsePen(NULL,1, Red, Green, Blue)
UseBrush(SOLID,Red,Green,Blue)
DrawRectangle(X1,Y1,X2,Y2)
If X1 >= 794 Then X1 = X1 - 16
X1 = X1 - 8 X2 = X2 - 8
Green = Green + 3
Blue = Blue + 3
Goto CyanScale
EndCyan:
InitMagenta:
Red = 0
Green = 0
Blue = 0
X1 = 803 X2 = 812
Y1 = 353 Y2 = 411
MagentaScale:
If X1 <= 202 then Goto EndMagenta
UsePen(NULL,1, Red, Green, Blue)
UseBrush(SOLID,Red,Green,Blue)
DrawRectangle(X1,Y1,X2,Y2)
If X1 >= 794 then X1 = X1 - 16
X1 = X1 - 8 X2 = X2 - 8
Red = Red + 3
Blue = Blue + 3
Goto MagentaScale
EndMagenta:
InitYellow:
Red = 0
Green = 0
Blue = 0
X1 = 803 X2 = 812
Y1 = 470 Y2 = 528
YellowScale:
If X1 <= 202 then Goto EndYellow
UsePen(NULL,1, Red, Green, Blue)
UseBrush(SOLID,Red,Green,Blue)
DrawRectangle(X1,Y1,X2,Y2)
If X1 >= 794 then X1 = X1 - 16
X1 = X1 - 8 X2 = X2 - 8
Red = Red + 3
Green = Green + 3
Goto YellowScale
EndYellow:
If Draw_All_Grids = 1 Then Goto Geom
Goto Wait_For_Input
Geom:
UseBrush(NULL,0,0,0)
UsePen(SOLID,2,255,255,0)
eX1 = 195 eY1 = 20
eX2 = X_Pixels - 195
diameter = eX2 - eX1
eY2 = eY1 + diameter
DrawEllipse(eX1,eY1,eX2,eY2)
eX1 = 255 eY1 = 80
eX2 = X_Pixels - 255
diameter = eX2 - eX1
eY2 = eY1 + diameter
UsePen(SOLID,2,255,0,255)
DrawEllipse(eX1,eY1,eX2,eY2)
eX1 = 315 eY1 = 140
eX2 = X_Pixels - 315
diameter = eX2 - eX1
eY2 = eY1 + diameter
UsePen(SOLID,2,0,255,255)
DrawEllipse(eX1,eY1,eX2,eY2)
WinGetClientRect("",cx1,cy1,cx2,cy2)
SetMouse(cx1,cy1,cx2,cy2,GetXY,X,Y)
Draw_All_Grids = 0
Goto Wait_for_Input
Locate:
Goto Wait_for_Input
Maximize:
WinShow(Title$,MAXIMIZE,Res)
Goto Wait_for_Input
Help_Wedge:
MessageBox(OK,1,INFORMATION,
"The Color Wedges start from Black on the left and
end up with the primary colors (Red-Green-blue) and
their opposites (Yellow-Megenta-Cyan) on the right.
There is also a greyscale wedge shown, starting from
Black on the left and ending with White on the right.
The monitor colour balance should be adjusted so that
there is no colour shading in the greyscale.
Click on the right mouse to invert the colors in the
client rectangle.",
"Colour Wedge",Res)
Goto Wait_For_Input
Help_Pattern:
MessageBox(OK,1,INFORMATION,
"This pattern consists of 3 interlaced circles.
These serve as reference for the vertical and
horizontal display size of your monitor. Adjust
your monitor so that the circle is round, rather
than an ellipse.
It also shows you the coordinates of any pixel
you point at on the screen using the left mouse.
Click on the right mouse to invert the colors in the
client rectangle.",
"Pattern and Coordinates",Res)
Goto Wait_For_Input
Help_Grids:
MessageBox(OK,1,INFORMATION,
"Grid 1:
Draws a square grid on the screen consisting
of any choosen size, with the default value of 33.
Grid 2:
Draws 4 bull's eye patterns, each near one of the
corners f the screen. There are also 3 wedges using
the primary colors (Red-Green-Blue) shown in
the middle of the screen inside a rectangle.
This can help you adjust the overall display of
your monitor (colors and position) if needed.
Grid 3:
This grid is an addition to the previous
one in that it prints 3 more wedges using
the opposites (Yellow-Magenta-Cyan) of the
primary colors.
Draw All:
This last option first displays Grid 1 with the
default value of 33 being used. It next adds
Grid 2 and 3 to the display and finishes it
with the Pattern/coordinates utility.
Click on the right mouse to invert the colors in the
client rectangle.",
"All the Grids",Res)
Goto Wait_For_Input
About:
AboutUser("About Monitor Setup", "Windows 95 / NT 4.0 Monitor Setup Utility.",
"This application helps you set up the geometry and color balance of your monitor.")
Goto Wait_For_Input
Run_Leave:
End
Bitmaps:
DrawBitMap(50,25,Square$)
DrawBitMap(808,25,Square$)
DrawBitMap(50,528,Square$)
DrawBitMap(808,528,Square$)
Return
SData:
SX1 = 50 SY1 = 25
Gosub Squares
SX1 = 817 SY1 = 25
Gosub Squares
SX1 = 50 SY1 = 532
Gosub Squares
SX1 = 817 SY1 = 532
Gosub Squares
Return
Squares:
UseBrush(NULL,0,0,0)
UsePen(SOLID,1,255,255,255)
SX2 = SX1 + 150 SY2 = SY1 + 150
DrawRectangle(SX1,SY1,SX2,SY2)
SX1 = SX1 + 1 SY1 = SY1 + 1
SX2 = SX2 - 1 SY2 = SY2 - 1
DrawEllipse(SX1,SY1,SX2,SY2)
SX1 = SX1 + 20 SY1 = SY1 + 20
SX2 = SX2 - 20 SY2 = SY2 - 20
DrawEllipse(SX1,SY1,SX2,SY2)
SX1 = SX1 + 20 SY1 = SY1 + 20
SX2 = SX2 - 20 SY2 = SY2 - 20
DrawEllipse(SX1,SY1,SX2,SY2)
SX1 = SX1 + 20 SY1 = SY1 + 20
SX2 = SX2 - 20 SY2 = SY2 - 20
DrawEllipse(SX1,SY1,SX2,SY2)
SX1 = SX1 + 5 SY1 = SY1 + 5
UseBrush(SOLID,255,255,0)
DrawFlood(SX1,SY1,255,255,255)
SX1 = SX1 -15 SY1 = SY1 - 15
UseBrush(SOLID,0,255,0)
DrawFlood(SX1, SY1,255,255,255)
SX1 = SX1 - 10 SY1 = SY1 - 10
UseBrush(SOLID,0,0,255)
DrawFlood(SX1,SY1,255,255,255)
SX1 = SX1 - 10 SY1 = SY1 - 10
USeBrush(SOLID,255,0,0)
DrawFlood(SX1,SY1,255,255,255)
Return